<script>
import { computed } from 'vue'
import { useStore } from 'vuex'
import MainMenu from './components/MainMenu.vue'

export default {
  name: 'App',
  components: {
    MainMenu,
  },
  setup() {
    const store = useStore()
    const isAuthenticated = computed(() => store.getters['auth/isAuthenticated'])

    return {
      isAuthenticated,
    }
  },
}
</script>

<template>
  <div class="app-container">
    <nav class="main-nav" v-if="isAuthenticated">
      <MainMenu />
    </nav>
    <main class="main-content">
      <router-view />
    </main>
  </div>
</template>

<style>
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-nav {
  background-color: #2c3e50;
  padding: 1rem;
}

.main-content {
  flex: 1;
  padding: 2rem;
}
</style>
